<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <property>
    <name>yarn.resourcemanager.ha.enabled</name>
    <value>false</value>
  </property>
  <property>
    <name>yarn.resourcemanager.ha.automatic-failover.enabled</name>
    <value>false</value>
  </property>
  <property>
    <name>yarn.resourcemanager.ha.automatic-failover.embedded</name>
    <value>false</value>
  </property>
  <property>
    <name>yarn.resourcemanager.cluster-id</name>
    <value>yarn-rm-cluster</value>
  </property>
  <property>
    <name>yarn.resourcemanager.resource-tracker.address</name>
    <value>{{ hostvars[groups['hadoop'][0]]['hostname'] }}:8031</value>
  </property>     
  <property>
    <name>yarn.resourcemanager.address</name>
    <value>{{ hostvars[groups['hadoop'][0]]['hostname'] }}:8032</value>
  </property>
  <property>
    <name>yarn.resourcemanager.scheduler.address</name>
    <value>{{ hostvars[groups['hadoop'][0]]['hostname'] }}:8034</value>
  </property>
  <property>
    <name>yarn.resourcemanager.webapp.address</name>
    <value>{{ hostvars[groups['hadoop'][0]]['hostname'] }}:8088</value>
  </property>
  <property>
    <name>yarn.nodemanager.log-dirs</name>
    <value>{{ hadoop_datadir }}/yarn-log/0</value>
  </property>
  <property>
    <name>yarn.scheduler.capacity.resource-calculator</name>
    <value>org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator</value>
  </property>
  <property>
    <name>yarn.resourcemanager.scheduler.class</name>
    <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler</value>
  </property>
  <property>
    <name>yarn.resourcemanager.recovery.enabled</name>
    <value>true</value>
  </property>
  <property>
    <name>yarn.acl.enable</name>
    <value>true</value>
  </property>
  <property>
    <name>yarn.admin.acl</name>
    <value>*</value>
  </property>
  <property>
    <name>yarn.log-aggregation-enable</name>
    <value>false</value>
  </property>
  <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
  <property>
    <name>yarn.nodemanager.resource.count-logical-processors-as-cores</name>
    <value>true</value>
  </property>
  <property>
    <name>yarn.log-aggregation.retain-seconds</name>
    <value>-1</value>
  </property>
  <property>
    <name>yarn.scheduler.minimum-allocation-mb</name>
    <value>1024</value>
  </property>
  <property>
    <name>yarn.scheduler.maximum-allocation-mb</name>
    <value>28672</value>
  </property>
  <property>
    <name>yarn.app.mapreduce.am.resource.mb</name>
    <value>28672</value>
  </property>
  <property>
    <name>yarn.nodemanager.log.retain-seconds</name>
    <value>10800</value>
  </property>
  <property>
    <name>yarn.nodemanager.resource.memory-mb</name>
    <value>{{ hadoop_vmemory * 1024 }}</value>
  </property>
  <property>
    <name>yarn.nodemanager.resource.cpu-vcores</name>
    <value>{{ hadoop_vcore * 3 }}</value>
  </property>
  <property>
    <name>yarn.log-aggregation.retain-check-interval-seconds</name>
    <value>-1</value>
  </property>
  <property>
    <name>yarn.scheduler.fair.assignmultiple</name>
    <value>true</value>
  </property>
  <property>
    <name>yarn.scheduler.fair.max.assign</name>
    <value>1</value>
  </property>
  <property>
    <name>yarn.application.classpath</name>
    <value>{{ snc_home_path }}/hadoop/etc/hadoop:{{ snc_home_path }}/hadoop/share/hadoop/common/lib/*:{{ snc_home_path }}/hadoop/share/hadoop/common/*:{{ snc_home_path }}/hadoop/share/hadoop/hdfs:{{ snc_home_path }}/hadoop/share/hadoop/hdfs/lib/*:{{ snc_home_path }}/hadoop/share/hadoop/hdfs/*:{{ snc_home_path }}/hadoop/share/hadoop/mapreduce/*:{{ snc_home_path }}/hadoop/share/hadoop/yarn:{{ snc_home_path }}/hadoop/share/hadoop/yarn/lib/*:{{ snc_home_path }}/hadoop/share/hadoop/yarn/*</value>
  </property>
</configuration>
